import request from '@/utils/request';

export function listTreeDept(cmNo) {
  return request({ url: "/runtine/ClassMettingTheme/listTreeDept/" + cmNo, method: "get" });
}
export function listClassByTNo() {
  return request({
    url: "/runtine/ClassMettingTheme/listClassByTNo", method: "get"
  });
}

export function listClassByMajorId(id, cmNo) {
  return request({
    url: "/runtine/ClassMettingTheme/listClassByMajorId", method: "get",
    params: { majorId: id, cmNo: cmNo }
  });
}


export function listMajorsByDeptId(id) {
  return request({ url: "/runtine/ClassMettingTheme/listMajorsByDeptId/" + id, method: "get" });
}

export function listDept() {
  return request({ url: "/runtine/ClassMettingTheme/listDept", method: "get" });
}

// 查询班会主题列表
export function listClassMettingTheme(query) {
  return request({
    url: '/runtine/ClassMettingTheme/list',
    method: 'get',
    params: query
  })
}

// 查询自己是否已上传材料
export function listClassMettingComplateTheme(query) {
  return request({
    url: 'runtine/ClassMettingTheme/complatelist',
    method: 'get',
    params: query
  })
}

// 查询班会主题详细
export function getClassMettingTheme(cmId) {
  return request({
    url: '/runtine/ClassMettingTheme/' + cmId,
    method: 'get'
  })
}

// 新增班会主题
export function addClassMettingTheme(data) {
  return request({
    url: '/runtine/ClassMettingTheme/add',
    method: 'post',
    data: data
  })
}

// 修改班会主题
export function updateClassMettingTheme(data) {
  return request({
    url: '/runtine/ClassMettingTheme/update',
    method: 'post',
    data: data
  })
}

// 删除班会主题
export function delClassMettingTheme(cmId) {
  return request({
    url: '/runtine/ClassMettingTheme/' + cmId,
    method: 'post'
  })
}
